macro_rules! test_markdown {
    ($func:ident, $source:expr, $expect:expr) => {
        #[test]
        fn $func() {
            use markdown_parser::parse;
            let (res, errs) = parse($source);
            if let Some(errs) = &errs {
                println!("{}", errs)
            }
            if let Some(res) = res {
                // println!("{:#?}", res);
                let left = res
                    .iter()
                    .fold("".to_string(), |acc, e| format!("{}{}", acc, e));
                assert_eq!(left, $expect)
            } else {
                panic!("解析错误");
            }
            assert!(errs.is_none())
        }
    };
    ($func:ident, $source:expr, $expect:expr,$ignore:expr) => {
        #[ignore = $ignore]
        #[test]
        fn $func() {
            use markdown_parser::parse;
            let (res, errs) = parse($source);
            if let Some(errs) = &errs {
                println!("{}", errs)
            }
            if let Some(res) = res {
                // println!("{:#?}", res);
                let left = res
                    .iter()
                    .fold("".to_string(), |acc, e| format!("{}{}", acc, e));
                assert_eq!(left, $expect)
            } else {
                panic!("解析错误");
            }
            assert!(errs.is_none())
        }
    };
}
